package SpringFramework.SpringProfile.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import SpringFramework.SpringProfile.service.DemoBean;

// @Configuration声明当前类是一个配置类
@Configuration
public class JavaConfig {
	@Bean
	@Profile("development")
	public DemoBean developmentDemoBean() {
		return new DemoBean("from development profile");
	}


	@Bean
	@Profile("production")
	public DemoBean productionDemoBean() {
		return new DemoBean("from production profile");
	}
}
